import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import store from '@/store'
import common from '@/libs/common'
import config from '@/config'
import Vant from 'vant'
import 'vant/lib/index.css'
import VueWechatTitle from 'vue-wechat-title'
import VueBaiDuMap from 'vue-baidu-map'
import VueValidator from 'vue-validator'
import './libs/rem'
import echarts from 'echarts'
import dataV from '@jiaminghi/data-view'

import VConsole from 'vconsole'

if (config.debug) {
  let a = new VConsole()
  console.log(a)
}
// ----------------------

if (process.env.NODE_ENV !== 'production') require('@/mock')
Vue.use(Vant)
Vue.use(VueWechatTitle)
Vue.use(VueValidator)
Vue.use(VueBaiDuMap, { ak: '4X5NhHAapMsQmNHWkhd0P4uS' })
Vue.use(dataV)

Vue.config.productionTip = false
Vue.prototype.$common = common
Vue.prototype.$config = config
Vue.prototype.$echarts = echarts
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
